home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / MPW Oberon 2.1168 / OInterfaces / GXTypes.mod < prev    next >
Encoding:
Text File  |  1995-08-10  |  50.5 KB  |  1,889 lines  |  [TEXT/MPS ]

  1. (*
  2.      File:        GXTypes.mod
  3.  
  4.      Contains:    QuickDraw GX object and constant definitions
  5.  
  6.      Version:    Technology:    Quickdraw GX 1.1
  7.                  Package:    Universal Interfaces 2.1ß1 in “MPW Prerelease” on ETO #17
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs.applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. *)
  19.  
  20. (*$TAGS-*)
  21. (*$CALLING PASCAL*)
  22. MODULE GXTypes;
  23.  
  24. IMPORT SYSTEM, Types, FixMath, GXMath;
  25.  
  26. (*  $PUSH*)
  27. (* $ALIGN MAC68K*)
  28. (* $LibExport+*)
  29. (*$SET graphicsTypesIncludes TRUE*)
  30.     
  31. TYPE
  32.     gxShape* = Types.Ptr;
  33.  
  34.     gxStyle* = Types.Ptr;
  35.  
  36.     gxInk* = Types.Ptr;
  37.  
  38.     gxTransform* = Types.Ptr;
  39.  
  40.     gxTag* = Types.Ptr;
  41.  
  42.     gxColorSet* = Types.Ptr;
  43.  
  44.     gxColorProfile* = Types.Ptr;
  45.  
  46.     gxGraphicsClient* = Types.Ptr;
  47.  
  48.     gxViewGroup* = Types.Ptr;
  49.  
  50.     gxViewPort* = Types.Ptr;
  51.  
  52.     gxViewDevice* = Types.Ptr;
  53.  
  54.     gxColorSpace* = LONGINT;
  55.  
  56. (* gxShape enumerations *)
  57.  
  58. CONST
  59.     gxEmptyType*                    = 1;
  60.     gxPointType*                    = 2;
  61.     gxLineType*                    = 3;
  62.     gxCurveType*                    = 4;
  63.     gxRectangleType*                = 5;
  64.     gxPolygonType*                = 6;
  65.     gxPathType*                    = 7;
  66.     gxBitmapType*                = 8;
  67.     gxTextType*                    = 9;
  68.     gxGlyphType*                    = 10;
  69.     gxLayoutType*                = 11;
  70.     gxFullType*                    = 12;
  71.     gxPictureType*                = 13;
  72.  
  73.     
  74. TYPE
  75.     gxShapeType* = LONGINT;
  76.  
  77.  
  78. CONST
  79.     gxNoFill*                    = 0;
  80.     gxOpenFrameFill*                = 1;
  81.     gxFrameFill*                    = gxOpenFrameFill;
  82.     gxClosedFrameFill*            = 2;
  83.     gxHollowFill*                = gxClosedFrameFill;
  84.     gxEvenOddFill*                = 3;
  85.     gxSolidFill*                    = gxEvenOddFill;
  86.     gxWindingFill*                = 4;
  87.     gxInverseEvenOddFill*        = 5;
  88.     gxInverseSolidFill*            = gxInverseEvenOddFill;
  89.     gxInverseFill*                = gxInverseEvenOddFill;
  90.     gxInverseWindingFill*        = 6;
  91.  
  92.     
  93. TYPE
  94.     gxShapeFill* = LONGINT;
  95.  
  96.  
  97. CONST
  98.     gxNoAttributes*                = 0;
  99.     gxDirectShape*                = $0001;
  100.     gxRemoteShape*                = $0002;
  101.     gxCachedShape*                = $0004;
  102.     gxLockedShape*                = $0008;
  103.     gxGroupShape*                = $0010;
  104.     gxMapTransformShape*            = $0020;
  105.     gxUniqueItemsShape*            = $0040;
  106.     gxIgnorePlatformShape*        = $0080;
  107.     gxNoMetricsGridShape*        = $0100;
  108.     gxDiskShape*                    = $0200;
  109.     gxMemoryShape*                = $0400;
  110.  
  111.     
  112. TYPE
  113.     gxShapeAttribute* = LONGINT;
  114.  
  115. (* gxShape editing enumerations *)
  116.  
  117. CONST
  118.     gxBreakNeitherEdit*            = 0;
  119.     gxBreakLeftEdit*                = $0001;
  120.     gxBreakRightEdit*            = $0002;
  121.     gxRemoveDuplicatePointsEdit*    = $0004;
  122.  
  123. (* if the new first (or last) point exactly matches the point before it in *)
  124. (* the same contour, then remove it) *)
  125.     
  126. TYPE
  127.     gxEditShapeFlag* = LONGINT;
  128.  
  129.  
  130. CONST
  131.     gxSelectToEnd*                = -1;
  132.  
  133.     gxAnyNumber*                    = 1;
  134.     gxSetToNil*                    = -1;
  135.  
  136.     gxCounterclockwiseDirection*    = 0;
  137.     gxClockwiseDirection*        = 1;
  138.  
  139.     
  140. TYPE
  141.     gxContourDirection* = LONGINT;
  142.  
  143. (* gxShape structures *)
  144. (* The type 'gxPoint' is defined in "GXMath.h" *)
  145.     gxLine* = RECORD
  146.         first*:                    GXMath.gxPoint;
  147.         last*:                    GXMath.gxPoint;
  148.     END;
  149.  
  150.     gxCurve* = RECORD
  151.         first*:                    GXMath.gxPoint;
  152.         control*:                GXMath.gxPoint;
  153.         last*:                    GXMath.gxPoint;
  154.     END;
  155.  
  156.     gxRectangle* = RECORD
  157.         left*:                    Types.Fixed;
  158.         top*:                    Types.Fixed;
  159.         right*:                    Types.Fixed;
  160.         bottom*:                    Types.Fixed;
  161.     END;
  162.  
  163.     gxPolygon* = RECORD
  164.         vectors*:                LONGINT;
  165.         vector*:                    ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF GXMath.gxPoint;
  166.     END;
  167.  
  168.     gxPolygons* = RECORD
  169.         contours*:                LONGINT;
  170.         contour*:                ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF gxPolygon;
  171.     END;
  172.  
  173.     gxPath* = RECORD
  174.         vectors*:                LONGINT;
  175.         controlBits*:            ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF LONGINT;
  176.         vector*:                    ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF GXMath.gxPoint;
  177.     END;
  178.  
  179.     gxPaths* = RECORD
  180.         contours*:                LONGINT;
  181.         contour*:                ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF gxPath;
  182.     END;
  183.  
  184.     gxBitmap* = RECORD
  185.         image*:                    SYSTEM.PTR (*ΔΔ POINTER TO CHAR*);                                    (* pointer to pixels *)
  186.         width*:                    LONGINT;                                (* width in pixels *)
  187.         height*:                    LONGINT;                                (* height in pixels *)
  188.         rowBytes*:                LONGINT;                                (* width in bytes *)
  189.         pixelSize*:                LONGINT;                                (* physical bits per pixel *)
  190.         space*:                    gxColorSpace;
  191.         colorSet*:                gxColorSet;
  192.         profile*:                gxColorProfile;
  193.     END;
  194.  
  195.     gxLongRectangle* = RECORD
  196.         left*:                    LONGINT;
  197.         top*:                    LONGINT;
  198.         right*:                    LONGINT;
  199.         bottom*:                    LONGINT;
  200.     END;
  201.  
  202. (* gxStyle enumerations *)
  203.  
  204. CONST
  205.     gxCenterFrameStyle*            = 0;
  206.     gxSourceGridStyle*            = $0001;
  207.     gxDeviceGridStyle*            = $0002;
  208.     gxInsideFrameStyle*            = $0004;
  209.     gxOutsideFrameStyle*            = $0008;
  210.     gxAutoInsetStyle*            = $0010;
  211.  
  212.     
  213. TYPE
  214.     gxStyleAttribute* = LONGINT;
  215.  
  216.  
  217. CONST
  218.     gxBendDash*                    = $0001;
  219.     gxBreakDash*                    = $0002;
  220.     gxClipDash*                    = $0004;
  221.     gxLevelDash*                    = $0008;
  222.     gxAutoAdvanceDash*            = $0010;
  223.  
  224.     
  225. TYPE
  226.     gxDashAttribute* = LONGINT;
  227.  
  228.  
  229. CONST
  230.     gxPortAlignPattern*            = $0001;
  231.     gxPortMapPattern*            = $0002;
  232.  
  233.     
  234. TYPE
  235.     gxPatternAttribute* = LONGINT;
  236.  
  237.  
  238. CONST
  239.     gxSharpJoin*                    = $0000;
  240.     gxCurveJoin*                    = $0001;
  241.     gxLevelJoin*                    = $0002;
  242.  
  243.     
  244. TYPE
  245.     gxJoinAttribute* = LONGINT;
  246.  
  247.  
  248. CONST
  249.     gxLevelStartCap*                = $0001;
  250.     gxLevelEndCap*                = $0002;
  251.  
  252.     
  253. TYPE
  254.     gxCapAttribute* = LONGINT;
  255.  
  256.  
  257. CONST
  258.     gxAutoAdvanceText*            = $0001;
  259.     gxNoContourGridText*            = $0002;
  260.     gxNoMetricsGridText*            = $0004;
  261.     gxAnchorPointsText*            = $0008;
  262.     gxVerticalText*                = $0010;
  263.     gxNoOpticalScaleText*        = $0020;
  264.  
  265.     
  266. TYPE
  267.     gxTextAttribute* = LONGINT;
  268.  
  269.  
  270. CONST
  271.     gxLeftJustify*                = 0;
  272.     gxCenterJustify*                = FixMath.fract1 DIV 2;
  273.     gxRightJustify*                = FixMath.fract1;
  274.     gxFillJustify*                = -1;
  275.  
  276.     gxUnderlineAdvanceLayer*        = $0001;                        (* a gxLine is drawn through the advances *)
  277.     gxSkipWhiteSpaceLayer*        = $0002;                        (* except characters describing white space *)
  278.     gxUnderlineIntervalLayer*    = $0004;                        (* (+ gxStringLayer) a gxLine is drawn through the gaps between advances *)
  279.     gxUnderlineContinuationLayer* = $0008;                        (* (+ gxStringLayer) join this underline with another face *)
  280.     gxWhiteLayer*                = $0010;                        (* the layer draws to white instead of black *)
  281.     gxClipLayer*                    = $0020;                        (* the characters define a clip *)
  282.     gxStringLayer*                = $0040;                        (* all characters in run are combined *)
  283.  
  284.     
  285. TYPE
  286.     gxLayerFlag* = LONGINT;
  287.  
  288. (* gxStyle structures *)
  289.     gxFaceLayer* = RECORD
  290.         outlineFill*:            gxShapeFill;                            (* outline framed or filled *)
  291.         flags*:                    gxLayerFlag;                            (* various additional effects *)
  292.         outlineStyle*:            gxStyle;                                (* outline *)
  293.         outlineTransform*:        gxTransform;                            (* italic, condense, extend *)
  294.         boldOutset*:                GXMath.gxPoint;                                (* bold *)
  295.     END;
  296.  
  297.     gxTextFace* = RECORD
  298.         faceLayers*:                LONGINT;                                (* layer to implement shadow *)
  299.         advanceMapping*:            GXMath.gxMapping;                                (* algorithmic change to advance width *)
  300.         faceLayer*:                ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF gxFaceLayer;            (* zero or more face layers describing the face *)
  301.     END;
  302.  
  303.     gxJoinRecord* = RECORD
  304.         attributes*:                gxJoinAttribute;
  305.         join*:                    gxShape;
  306.         miter*:                    Types.Fixed;
  307.     END;
  308.  
  309.     gxDashRecord* = RECORD
  310.         attributes*:                gxDashAttribute;
  311.         dash*:                    gxShape;                                (* similar to pattern, except rotated to gxLine slope *)
  312.         advance*:                Types.Fixed;                                    (* specifies repeating frequency of dash *)
  313.         phase*:                    Types.Fract;                                    (* specifies offset into the gxPath to start dashing *)
  314.         scale*:                    Types.Fixed;                                    (* specifies height of dash to be mapped to penWidth *)
  315.     END;
  316.  
  317.     gxPatternRecord* = RECORD
  318.         attributes*:                gxPatternAttribute;
  319.         pattern*:                gxShape;
  320.         u*:                        GXMath.gxPoint;
  321.         v*:                        GXMath.gxPoint;
  322.     END;
  323.  
  324.     gxCapRecord* = RECORD
  325.         attributes*:                gxCapAttribute;
  326.         startCap*:                gxShape;
  327.         endCap*:                    gxShape;
  328.     END;
  329.  
  330. (* gxInk enumerations *)
  331.  
  332. CONST
  333.     gxPortAlignDitherInk*        = $0001;
  334.     gxForceDitherInk*            = $0002;
  335.     gxSuppressDitherInk*            = $0004;
  336.     gxSuppressHalftoneInk*        = $0008;
  337.  
  338.     
  339. TYPE
  340.     gxInkAttribute* = LONGINT;
  341.  
  342.  
  343. CONST
  344.     gxNoMode*                    = 0;
  345.     gxCopyMode*                    = 1;
  346.     gxAddMode*                    = 2;
  347.     gxBlendMode*                    = 3;
  348.     gxMigrateMode*                = 4;
  349.     gxMinimumMode*                = 5;
  350.     gxMaximumMode*                = 6;
  351.     gxHighlightMode*                = 7;
  352.     gxAndMode*                    = 8;
  353.     gxOrMode*                    = 9;
  354.     gxXorMode*                    = 10;
  355.     gxRampAndMode*                = 11;
  356.     gxRampOrMode*                = 12;
  357.     gxRampXorMode*                = 13;
  358.     gxOverMode*                    = 14;                            (* Alpha channel modes                *)
  359.     gxAtopMode*                    = 15;                            (* Note*: In England* = Beta channel modes        *)
  360.     gxExcludeMode*                = 16;
  361.     gxFadeMode*                    = 17;
  362.  
  363.     
  364. TYPE
  365.     gxComponentMode* = Types.SInt8;
  366.  
  367.  
  368. CONST
  369.     gxRejectSourceTransfer*        = $0001;                        (* at least one component must be out of range        *)
  370.     gxRejectDeviceTransfer*        = $0002;                        (* at least one component must be out of range        *)
  371.     gxSingleComponentTransfer*    = $0004;                        (* duplicate gxTransferComponent[0] for all components in transfer *)
  372.  
  373.     
  374. TYPE
  375.     gxTransferFlag* = LONGINT;
  376.  
  377.  
  378. CONST
  379.     gxOverResultComponent*        = $01;                            (* & result gxColor with 0xFFFF before clamping    *)
  380.     gxReverseComponent*            = $02;                            (* reverse source and device before moding        *)
  381.  
  382.     
  383. TYPE
  384.     gxComponentFlag* = Types.SInt8;
  385.  
  386.     gxTransferComponent* = RECORD
  387.         mode*:                    gxComponentMode;                        (* how the component is operated upon *)
  388.         flags*:                    gxComponentFlag;                        (* flags for each component    *)
  389.         sourceMinimum*:            GXMath.gxColorValue;
  390.         sourceMaximum*:            GXMath.gxColorValue;                            (* input filter range *)
  391.         deviceMinimum*:            GXMath.gxColorValue;
  392.         deviceMaximum*:            GXMath.gxColorValue;                            (* output filter range *)
  393.         clampMinimum*:            GXMath.gxColorValue;
  394.         clampMaximum*:            GXMath.gxColorValue;                            (* output clamping range *)
  395.         operand*:                GXMath.gxColorValue;                            (* ratio for blend, step for migrate, gxColor for highlight    *)
  396.     END;
  397.  
  398.     gxTransferMode* = RECORD
  399.         space*:                    gxColorSpace;                            (* the gxColor-space the transfer mode is to operate in    *)
  400.         colorSet*:                gxColorSet;
  401.         profile*:                gxColorProfile;
  402.         sourceMatrix*:            ARRAY 5,4 (*ΔΔ[0..4,0..3]ΔΔ*) OF Types.Fixed;
  403.         deviceMatrix*:            ARRAY 5,4 (*ΔΔ[0..4,0..3]ΔΔ*) OF Types.Fixed;
  404.         resultMatrix*:            ARRAY 5,4 (*ΔΔ[0..4,0..3]ΔΔ*) OF Types.Fixed;
  405.         flags*:                    gxTransferFlag;
  406.         component*:                ARRAY 4 (*ΔΔ[0..3]ΔΔ*) OF gxTransferComponent;    (* how each component is operated upon            *)
  407.     END;
  408.  
  409. (* gxColor space enumerations *)
  410.  
  411. CONST
  412.     gxNoColorPacking*            = $0000;                        (* 16 bits per channel *)
  413.     gxAlphaSpace*                = $0080;                        (* space includes alpha channel *)
  414.     gxWord5ColorPacking*            = $0500;                        (* 5 bits per channel, right-justified *)
  415.     gxLong8ColorPacking*            = $0800;                        (* 8 bits per channel, right-justified *)
  416.     gxLong10ColorPacking*        = $0a00;                        (* 10 bits per channel, right-justified *)
  417.     gxAlphaFirstPacking*            = $1000;                        (* alpha channel is the first field in the packed space *)
  418.  
  419.     gxNoSpace*                    = 0;
  420.     gxRGBSpace*                    = 1;
  421.     gxCMYKSpace*                    = 2;
  422.     gxHSVSpace*                    = 3;
  423.     gxHLSSpace*                    = 4;
  424.     gxYXYSpace*                    = 5;
  425.     gxXYZSpace*                    = 6;
  426.     gxLUVSpace*                    = 7;
  427.     gxLABSpace*                    = 8;
  428.     gxYIQSpace*                    = 9;
  429.     gxNTSCSpace*                    = gxYIQSpace;
  430.     gxPALSpace*                    = gxYIQSpace;
  431.     gxGraySpace*                    = 10;
  432.     gxIndexedSpace*                = 11;
  433.     gxRGBASpace*                    = gxRGBSpace + gxAlphaSpace;
  434.     gxGrayASpace*                = gxGraySpace + gxAlphaSpace;
  435.     gxRGB16Space*                = gxWord5ColorPacking + gxRGBSpace;
  436.     gxRGB32Space*                = gxLong8ColorPacking + gxRGBSpace;
  437.     gxARGB32Space*                = gxLong8ColorPacking + gxAlphaFirstPacking + gxRGBASpace;
  438.     gxCMYK32Space*                = gxLong8ColorPacking + gxCMYKSpace;
  439.     gxHSV32Space*                = gxLong10ColorPacking + gxHSVSpace;
  440.     gxHLS32Space*                = gxLong10ColorPacking + gxHLSSpace;
  441.     gxYXY32Space*                = gxLong10ColorPacking + gxYXYSpace;
  442.     gxXYZ32Space*                = gxLong10ColorPacking + gxXYZSpace;
  443.     gxLUV32Space*                = gxLong10ColorPacking + gxLUVSpace;
  444.     gxLAB32Space*                = gxLong10ColorPacking + gxLABSpace;
  445.     gxYIQ32Space*                = gxLong10ColorPacking + gxYIQSpace;
  446.     gxNTSC32Space*                = gxYIQ32Space;
  447.     gxPAL32Space*                = gxYIQ32Space;
  448.  
  449. (* gxColor space structures *)
  450.  
  451. TYPE
  452.     gxRGBColor* = RECORD
  453.         red*:                    GXMath.gxColorValue;
  454.         green*:                    GXMath.gxColorValue;
  455.         blue*:                    GXMath.gxColorValue;
  456.     END;
  457.  
  458.     gxRGBAColor* = RECORD
  459.         red*:                    GXMath.gxColorValue;
  460.         green*:                    GXMath.gxColorValue;
  461.         blue*:                    GXMath.gxColorValue;
  462.         alpha*:                    GXMath.gxColorValue;
  463.     END;
  464.  
  465.     gxHSVColor* = RECORD
  466.         hue*:                    GXMath.gxColorValue;
  467.         saturation*:                GXMath.gxColorValue;
  468.         value*:                    GXMath.gxColorValue;
  469.     END;
  470.  
  471.     gxHLSColor* = RECORD
  472.         hue*:                    GXMath.gxColorValue;
  473.         lightness*:                GXMath.gxColorValue;
  474.         saturation*:                GXMath.gxColorValue;
  475.     END;
  476.  
  477.     gxCMYKColor* = RECORD
  478.         cyan*:                    GXMath.gxColorValue;
  479.         magenta*:                GXMath.gxColorValue;
  480.         yellow*:                    GXMath.gxColorValue;
  481.         black*:                    GXMath.gxColorValue;
  482.     END;
  483.  
  484.     gxXYZColor* = RECORD
  485.         x*:                        GXMath.gxColorValue;
  486.         y*:                        GXMath.gxColorValue;
  487.         z*:                        GXMath.gxColorValue;
  488.     END;
  489.  
  490.     gxYXYColor* = RECORD
  491.         capY*:                    GXMath.gxColorValue;
  492.         x*:                        GXMath.gxColorValue;
  493.         y*:                        GXMath.gxColorValue;
  494.     END;
  495.  
  496.     gxLUVColor* = RECORD
  497.         l*:                        GXMath.gxColorValue;
  498.         u*:                        GXMath.gxColorValue;
  499.         v*:                        GXMath.gxColorValue;
  500.     END;
  501.  
  502.     gxLABColor* = RECORD
  503.         l*:                        GXMath.gxColorValue;
  504.         a*:                        GXMath.gxColorValue;
  505.         b*:                        GXMath.gxColorValue;
  506.     END;
  507.  
  508.     gxYIQColor* = RECORD
  509.         y*:                        GXMath.gxColorValue;
  510.         i*:                        GXMath.gxColorValue;
  511.         q*:                        GXMath.gxColorValue;
  512.     END;
  513.  
  514.     gxGrayAColor* = RECORD
  515.         gray*:                    GXMath.gxColorValue;
  516.         alpha*:                    GXMath.gxColorValue;
  517.     END;
  518.  
  519.     gxColorIndex* = LONGINT;
  520.  
  521.     gxIndexedColor* = RECORD
  522.         index*:                    gxColorIndex;
  523.         colorSet*:                gxColorSet;
  524.     END;
  525.  
  526.     gxColor* = RECORD
  527.         space*:                    gxColorSpace;
  528.         profile*:                gxColorProfile;
  529.         (*ΔΔ CASE INTEGER OF
  530.         0: ( *)
  531.     END;
  532.     gxColorCMYK* = RECORD(gxColor)
  533.             cmyk*:                        gxCMYKColor;
  534.            (*ΔΔ );
  535.         1: ( *)
  536.     END;
  537.     gxColorRGB* = RECORD(gxColor)
  538.             rgb*:                        gxRGBColor;
  539.            (*ΔΔ );
  540.         2: ( *)
  541.     END;
  542.     gxColorRGBA* = RECORD(gxColor)
  543.             rgba*:                        gxRGBAColor;
  544.            (*ΔΔ );
  545.         3: ( *)
  546.     END;
  547.     gxColorHSV* = RECORD(gxColor)
  548.             hsv*:                        gxHSVColor;
  549.            (*ΔΔ );
  550.         4: ( *)
  551.     END;
  552.     gxColorHLS* = RECORD(gxColor)
  553.             hls*:                        gxHLSColor;
  554.            (*ΔΔ );
  555.         5: ( *)
  556.     END;
  557.     gxColorXYZ* = RECORD(gxColor)
  558.             xyz*:                        gxXYZColor;
  559.            (*ΔΔ );
  560.         6: ( *)
  561.     END;
  562.     gxColorYXY* = RECORD(gxColor)
  563.             yxy*:                        gxYXYColor;
  564.            (*ΔΔ );
  565.         7: ( *)
  566.     END;
  567.     gxColorLUV* = RECORD(gxColor)
  568.             luv*:                        gxLUVColor;
  569.            (*ΔΔ );
  570.         8: ( *)
  571.     END;
  572.     gxColorLAB* = RECORD(gxColor)
  573.             lab*:                        gxLABColor;
  574.            (*ΔΔ );
  575.         9: ( *)
  576.     END;
  577.     gxColorYIQ* = RECORD(gxColor)
  578.             yiq*:                        gxYIQColor;
  579.            (*ΔΔ );
  580.         10: ( *)
  581.     END;
  582.     gxColorGray* = RECORD(gxColor)
  583.             gray*:                        GXMath.gxColorValue;
  584.            (*ΔΔ );
  585.         11: ( *)
  586.     END;
  587.     gxColorGrayA* = RECORD(gxColor)
  588.             graya*:                        gxGrayAColor;
  589.            (*);
  590.         12: ( *)
  591.     END;
  592.     gxColorPixel16* = RECORD(gxColor)
  593.             pixel16*:                    INTEGER;
  594.            (*ΔΔ );
  595.         13: ( *)
  596.     END;
  597.     gxColorPixel32* = RECORD(gxColor)
  598.             pixel32*:                    LONGINT;
  599.            (*ΔΔ );
  600.         14: ( *)
  601.     END;
  602.     gxColorIndexed* = RECORD(gxColor)
  603.             indexed*:                    gxIndexedColor;
  604.            (*ΔΔ );
  605.         15: ( *)
  606.     END;
  607.     gxColorComponent* = RECORD(gxColor)
  608.             component*:                    ARRAY 4 (*ΔΔ[0..3]ΔΔ*) OF GXMath.gxColorValue;
  609.            (*ΔΔ );*)
  610.     END;
  611.  
  612. (* gxColorSet structures *)
  613.     gxSetColor* = RECORD
  614.         (*ΔΔ CASE INTEGER OF
  615.         0: ( *)
  616.     END;
  617.     gxSetColorCYMK* = RECORD(gxSetColor)
  618.             cmyk*:                        gxCMYKColor;
  619.            (*ΔΔ );
  620.         1: ( *)
  621.     END;
  622.     gxSetColorRGB* = RECORD(gxSetColor)
  623.             rgb*:                        gxRGBColor;
  624.            (*ΔΔ );
  625.         2: ( *)
  626.     END;
  627.     gxSetColorRGBA* = RECORD(gxSetColor)
  628.             rgba*:                        gxRGBAColor;
  629.            (*ΔΔ );
  630.         3: ( *)
  631.     END;
  632.     gxSetColorHSV* = RECORD(gxSetColor)
  633.             hsv*:                        gxHSVColor;
  634.            (*ΔΔ );
  635.         4: ( *)
  636.     END;
  637.     gxSetColorHLS* = RECORD(gxSetColor)
  638.             hls*:                        gxHLSColor;
  639.            (*ΔΔ );
  640.         5: ( *)
  641.     END;
  642.     gxSetColorXYZ* = RECORD(gxSetColor)
  643.             xyz*:                        gxXYZColor;
  644.            (*ΔΔ );
  645.         6: ( *)
  646.     END;
  647.     gxSetColorYXY* = RECORD(gxSetColor)
  648.             yxy*:                        gxYXYColor;
  649.            (*ΔΔ );
  650.         7: ( *)
  651.     END;
  652.     gxSetColorLUV* = RECORD(gxSetColor)
  653.             luv*:                        gxLUVColor;
  654.            (*ΔΔ );
  655.         8: ( *)
  656.     END;
  657.     gxSetColorLAB* = RECORD(gxSetColor)
  658.             lab*:                        gxLABColor;
  659.            (*ΔΔ );
  660.         9: ( *)
  661.     END;
  662.     gxSetColorYIQ* = RECORD(gxSetColor)
  663.             yiq*:                        gxYIQColor;
  664.            (*ΔΔ );
  665.         10: ( *)
  666.     END;
  667.     gxSetColorGray* = RECORD(gxSetColor)
  668.             gray*:                        GXMath.gxColorValue;
  669.            (*ΔΔ );
  670.         11: ( *)
  671.     END;
  672.     gxSetColorGrayA* = RECORD(gxSetColor)
  673.             graya*:                        gxGrayAColor;
  674.            (*ΔΔ );
  675.         12: ( *)
  676.     END;
  677.     gxSetColorPixel16* = RECORD(gxSetColor)
  678.             pixel16*:                    INTEGER;
  679.            (*ΔΔ );
  680.         13: ( *)
  681.     END;
  682.     gxSetColorPixel32* = RECORD(gxSetColor)
  683.             pixel32*:                    LONGINT;
  684.            (*ΔΔ );
  685.         14: ( *)
  686.     END;
  687.     gxSetColorComponent* = RECORD(gxSetColor)
  688.             component*:                    ARRAY 4 (*ΔΔ[0..3]ΔΔ*) OF GXMath.gxColorValue;
  689.            (*ΔΔ );*)
  690.     END;
  691.  
  692. (* gxTransform enumerations *)
  693. (* parts of a gxShape considered in hit testing*: *)
  694.  
  695. CONST
  696.     gxNoPart*                    = 0;                            (* (in order of evaluation) *)
  697.     gxBoundsPart*                = $0001;
  698.     gxGeometryPart*                = $0002;
  699.     gxPenPart*                    = $0004;
  700.     gxCornerPointPart*            = $0008;
  701.     gxControlPointPart*            = $0010;
  702.     gxEdgePart*                    = $0020;
  703.     gxJoinPart*                    = $0040;
  704.     gxStartCapPart*                = $0080;
  705.     gxEndCapPart*                = $0100;
  706.     gxDashPart*                    = $0200;
  707.     gxPatternPart*                = $0400;
  708.     gxGlyphBoundsPart*            = gxJoinPart;
  709.     gxGlyphFirstPart*            = gxStartCapPart;
  710.     gxGlyphLastPart*                = gxEndCapPart;
  711.     gxSideBearingPart*            = gxDashPart;
  712.     gxAnyPart*                    = gxBoundsPart + gxGeometryPart + gxPenPart + gxCornerPointPart + gxControlPointPart + gxEdgePart + gxJoinPart + gxStartCapPart + gxEndCapPart + gxDashPart + gxPatternPart;
  713.  
  714.     
  715. TYPE
  716.     gxShapePart* = LONGINT;
  717.  
  718. (* gxTransform structures *)
  719.     gxHitTestInfo* = RECORD
  720.         what*:                    gxShapePart;                            (* which part of gxShape *)
  721.         index*:                    LONGINT;                                (* control GXMath.gxPoint index *)
  722.         distance*:                Types.Fixed;                                    (* how far from GXMath.gxPoint or outside of area click was *)
  723.         (* these fields are only set by GXHitTestPicture *)
  724.         which*:                    gxShape;
  725.         containerPicture*:        gxShape;                                (* picture which contains gxShape hit *)
  726.         containerIndex*:            LONGINT;                                (* the index within that picture  *)
  727.         totalIndex*:                LONGINT;                                (* the total index within the root picture *)
  728.     END;
  729.  
  730. (* gxViewPort enumerations *)
  731.  
  732. CONST
  733.     gxGrayPort*                    = $0001;
  734.     gxAlwaysGridPort*            = $0002;
  735.     gxEnableMatchPort*            = $0004;
  736.  
  737.     
  738. TYPE
  739.     gxPortAttribute* = LONGINT;
  740.  
  741. (* gxViewDevice enumerations *)
  742.  
  743. CONST
  744.     gxDirectDevice*                = $01;                            (* for the device gxBitmap baseAddr pointer *)
  745.     gxRemoteDevice*                = $02;
  746.     gxInactiveDevice*            = $04;
  747.  
  748.     
  749. TYPE
  750.     gxDeviceAttribute* = LONGINT;
  751.  
  752.  
  753. CONST
  754.     gxRoundDot*                    = 1;
  755.     gxSpiralDot*                    = 2;
  756.     gxSquareDot*                    = 3;
  757.     gxLineDot*                    = 4;
  758.     gxEllipticDot*                = 5;
  759.     gxTriangleDot*                = 6;
  760.     gxDispersedDot*                = 7;
  761.     gxCustomDot*                    = 8;
  762.  
  763.     
  764. TYPE
  765.     gxDotType* = LONGINT;
  766.  
  767. (* gxViewPort structures *)
  768.  
  769. CONST
  770.     gxNoTint*                    = 0;
  771.     gxLuminanceTint*                = 1;                            (* use the luminance of the gxColor *)
  772.     gxAverageTint*                = 2;                            (* add all the components and divide by the number of components *)
  773.     gxMixtureTint*                = 3;                            (* find the closest gxColor on the axis between the foreground and background *)
  774.     gxComponent1Tint*            = 4;                            (* use the value of the first component of the gxColor *)
  775.     gxComponent2Tint*            = 5;                            (* ... etc. *)
  776.     gxComponent3Tint*            = 6;
  777.     gxComponent4Tint*            = 7;
  778.  
  779.     
  780. TYPE
  781.     gxTintType* = LONGINT;
  782.  
  783.     gxHalftone* = RECORD
  784.         angle*:                    Types.Fixed;
  785.         frequency*:                Types.Fixed;
  786.         method*:                    gxDotType;
  787.         tinting*:                gxTintType;
  788.         dotColor*:                gxColor;
  789.         backgroundColor*:        gxColor;
  790.         tintSpace*:                gxColorSpace;
  791.     END;
  792.  
  793.     gxHalftoneMatrix* = RECORD
  794.         dpiX*:                    Types.Fixed;                                    (* intended resolution *)
  795.         dpiY*:                    Types.Fixed;
  796.         width*:                    LONGINT;                                (* width of matrix (in device pixels) *)
  797.         height*:                    LONGINT;                                (* height of matrix (in device pixels) *)
  798.         tileShift*:                LONGINT;                                (* shift amount (in samples) for rectangular tiling *)
  799.         samples*:                ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF INTEGER;                (* samples from 0..MAX(halftone tintSpace) *)
  800.     END;
  801.  
  802. (* gxViewGroup enumerations *)
  803.  
  804. CONST
  805.     gxAllViewDevices*            = 0;
  806.     gxScreenViewDevices*            = 1;
  807.  
  808.     gxOpenReadSpool*                = 1;
  809.     gxOpenWriteSpool*            = 2;
  810.     gxReadSpool*                    = 3;
  811.     gxWriteSpool*                = 4;
  812.     gxCloseSpool*                = 5;
  813.  
  814.     
  815. TYPE
  816.     gxSpoolCommand* = LONGINT;
  817.  
  818.     gxGraphicsOpcode* = Types.SInt8;
  819.  
  820.     gxSpoolUPP* = Types.UniversalProcPtr;
  821.  
  822.     gxSpoolBlock* = RECORD
  823.         spoolProcedure*:            gxSpoolUPP;                                (* these fields are read only *)
  824.         buffer*:                    Types.Ptr;                                    (* source/destination pointer to data *)
  825.         bufferSize*:                LONGINT;                                (* how many bytes for the system to read (flatten) / write (unflatten) *)
  826.         (* these fields are written to (but are not read from) *)
  827.         count*:                    LONGINT;                                (* how many bytes for the caller to read (unflatten) /write (flatten) *)
  828.         operationSize*:            LONGINT;                                (* operation size (including operand byte) *)
  829.         operationOffset*:        LONGINT;                                (* the data offset, if any, within the current operation *)
  830.         lastTypeOpcode*:            gxGraphicsOpcode;                        (* type of last created object *)
  831.         currentOperation*:        gxGraphicsOpcode;                        (* operation emitted by flatten, or intrepreted by last unflatten *)
  832.         currentOperand*:            gxGraphicsOpcode;                        (* e.g., gxTransformTypeOpcode, gxInkTagOpcode *)
  833.         compressed*:                Types.SInt8; (* unsigned char *)                (* one of*: gxTwoBitCompressionValues *)
  834.     END;
  835.  
  836.     gxSpoolProcPtr* = (*ΔΔ Types.ProcPtr;*) PROCEDURE (command: gxSpoolCommand; VAR block: gxSpoolBlock): LONGINT;
  837.  
  838. CONST
  839.     uppgxSpoolProcInfo* = $000003F1; (* PROCEDURE (4 byte param, 4 byte param): 4 byte result; *)
  840.  
  841. PROCEDURE NewgxSpoolProc*(userRoutine: gxSpoolProcPtr): gxSpoolUPP;
  842.     (*$IF NOT GENERATINGCFM *)
  843.     INLINE PASCAL $2E9F;
  844.     (*$END*)
  845.  
  846. PROCEDURE CallgxSpoolProc*(command: gxSpoolCommand; VAR block: gxSpoolBlock; userRoutine: gxSpoolUPP): LONGINT;
  847.     (*$IF NOT GENERATINGCFM*)
  848.     INLINE PASCAL $205F, $4E90;
  849.     (*$END*)
  850.  
  851. CONST
  852.     gxFontListFlatten*            = $01;                            (* if set, generate a gxTag containing list of each gxFont referenced *)
  853.     gxFontGlyphsFlatten*            = $02;                            (* if set, generate a gxTag containing the list of glyphs referenced inside the gxFont *)
  854.     gxFontVariationsFlatten*        = $04;                            (* if set, append the gxTag with separate [variation] coordinates *)
  855.     gxBitmapAliasFlatten*        = $08;                            (* if set, open bitmap alias files and flatten out their image data *)
  856.  
  857.     
  858. TYPE
  859.     gxFlattenFlag* = LONGINT;
  860.  
  861. (* gxGraphicsClient constants *)
  862.  
  863. CONST
  864.     gxGraphicsSystemClient*        = -1;
  865.  
  866.     gxStaticHeapClient*            = $0001;
  867.  
  868.     
  869. TYPE
  870.     gxClientAttribute* = LONGINT;
  871.  
  872. (* graphics patching constants *)
  873.  
  874. CONST
  875.     gxOriginalGraphicsFunction*    = -1;
  876.     gxOriginalGraphicsIdentifier* = LONG("grfx");
  877.  
  878.  
  879. TYPE
  880.     gxBitmapDataSourceAlias* = RECORD
  881.         fileOffset*:                LONGINT;                                (* file offset (in bytes) of top-left pixel *)
  882.         aliasRecordSize*:        LONGINT;                                (* size of alias record below *)
  883.         aliasRecord*:            ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF Types.SInt8; (* unsigned char *) (* the actual alias record data *)
  884.     END;
  885.  
  886.  
  887. CONST
  888.     gxBitmapFileAliasTagType*    = LONG("bfil");
  889.     gxBitmapFileAliasImageValue*    = 1;
  890.  
  891. (*$SET fontTypesIncludes TRUE*)
  892.     
  893. TYPE
  894.     gxFont* = HANDLE TO Types.Data (*ΔΔ POINTER TO Types.Ptr*);
  895.  
  896.  
  897. CONST
  898.     gxNoPlatform*                = 0;
  899.     gxNoScript*                    = 0;
  900.     gxNoLanguage*                = 0;
  901.     gxNoFontName*                = 0;
  902.     gxGlyphPlatform*                = -1;
  903.  
  904.     gxUnicodePlatform*            = 1;
  905.     gxMacintoshPlatform*            = 2;
  906.     gxReservedPlatform*            = 3;
  907.     gxMicrosoftPlatform*            = 4;
  908.     gxCustomPlatform*            = 5;
  909.  
  910.     
  911. TYPE
  912.     gxFontPlatform* = LONGINT;
  913.  
  914.  
  915. CONST
  916.     gxUnicodeDefaultSemantics*    = 1;
  917.     gxUnicodeV1_1Semantics*        = 2;
  918.     gxISO10646_1993Semantics*    = 3;
  919.  
  920.     gxRomanScript*                = 1;
  921.     gxJapaneseScript*            = 2;
  922.     gxTraditionalChineseScript*    = 3;
  923.     gxChineseScript*                = gxTraditionalChineseScript;
  924.     gxKoreanScript*                = 4;
  925.     gxArabicScript*                = 5;
  926.     gxHebrewScript*                = 6;
  927.     gxGreekScript*                = 7;
  928.     gxCyrillicScript*            = 8;
  929.     gxRussian*                    = gxCyrillicScript;
  930.     gxRSymbolScript*                = 9;
  931.     gxDevanagariScript*            = 10;
  932.     gxGurmukhiScript*            = 11;
  933.     gxGujaratiScript*            = 12;
  934.     gxOriyaScript*                = 13;
  935.     gxBengaliScript*                = 14;
  936.     gxTamilScript*                = 15;
  937.     gxTeluguScript*                = 16;
  938.     gxKannadaScript*                = 17;
  939.     gxMalayalamScript*            = 18;
  940.     gxSinhaleseScript*            = 19;
  941.     gxBurmeseScript*                = 20;
  942.     gxKhmerScript*                = 21;
  943.     gxThaiScript*                = 22;
  944.     gxLaotianScript*                = 23;
  945.     gxGeorgianScript*            = 24;
  946.     gxArmenianScript*            = 25;
  947.     gxSimpleChineseScript*        = 26;
  948.     gxTibetanScript*                = 27;
  949.     gxMongolianScript*            = 28;
  950.     gxGeezScript*                = 29;
  951.     gxEthiopicScript*            = gxGeezScript;
  952.     gxAmharicScript*                = gxGeezScript;
  953.     gxSlavicScript*                = 30;
  954.     gxEastEuropeanRomanScript*    = gxSlavicScript;
  955.     gxVietnameseScript*            = 31;
  956.     gxExtendedArabicScript*        = 32;
  957.     gxSindhiScript*                = gxExtendedArabicScript;
  958.     gxUninterpretedScript*        = 33;
  959.  
  960.     gxMicrosoftSymbolScript*        = 1;
  961.     gxMicrosoftStandardScript*    = 2;
  962.  
  963.     gxCustom8BitScript*            = 1;
  964.     gxCustom816BitScript*        = 2;
  965.     gxCustom16BitScript*            = 3;
  966.  
  967.     
  968. TYPE
  969.     gxFontScript* = LONGINT;
  970.  
  971.  
  972. CONST
  973.     gxEnglishLanguage*            = 1;
  974.     gxFrenchLanguage*            = 2;
  975.     gxGermanLanguage*            = 3;
  976.     gxItalianLanguage*            = 4;
  977.     gxDutchLanguage*                = 5;
  978.     gxSwedishLanguage*            = 6;
  979.     gxSpanishLanguage*            = 7;
  980.     gxDanishLanguage*            = 8;
  981.     gxPortugueseLanguage*        = 9;
  982.     gxNorwegianLanguage*            = 10;
  983.     gxHebrewLanguage*            = 11;
  984.     gxJapaneseLanguage*            = 12;
  985.     gxArabicLanguage*            = 13;
  986.     gxFinnishLanguage*            = 14;
  987.     gxGreekLanguage*                = 15;
  988.     gxIcelandicLanguage*            = 16;
  989.     gxMalteseLanguage*            = 17;
  990.     gxTurkishLanguage*            = 18;
  991.     gxCroatianLanguage*            = 19;
  992.     gxTradChineseLanguage*        = 20;
  993.     gxUrduLanguage*                = 21;
  994.     gxHindiLanguage*                = 22;
  995.     gxThaiLanguage*                = 23;
  996.     gxKoreanLanguage*            = 24;
  997.     gxLithuanianLanguage*        = 25;
  998.     gxPolishLanguage*            = 26;
  999.     gxHungarianLanguage*            = 27;
  1000.     gxEstonianLanguage*            = 28;
  1001.     gxLettishLanguage*            = 29;
  1002.     gxLatvianLanguage*            = gxLettishLanguage;
  1003.     gxSaamiskLanguage*            = 30;
  1004.     gxLappishLanguage*            = gxSaamiskLanguage;
  1005.     gxFaeroeseLanguage*            = 31;
  1006.     gxFarsiLanguage*                = 32;
  1007.     gxPersianLanguage*            = gxFarsiLanguage;
  1008.     gxRussianLanguage*            = 33;
  1009.     gxSimpChineseLanguage*        = 34;
  1010.     gxFlemishLanguage*            = 35;
  1011.     gxIrishLanguage*                = 36;
  1012.     gxAlbanianLanguage*            = 37;
  1013.     gxRomanianLanguage*            = 38;
  1014.     gxCzechLanguage*                = 39;
  1015.     gxSlovakLanguage*            = 40;
  1016.     gxSlovenianLanguage*            = 41;
  1017.     gxYiddishLanguage*            = 42;
  1018.     gxSerbianLanguage*            = 43;
  1019.     gxMacedonianLanguage*        = 44;
  1020.     gxBulgarianLanguage*            = 45;
  1021.     gxUkrainianLanguage*            = 46;
  1022.     gxByelorussianLanguage*        = 47;
  1023.     gxUzbekLanguage*                = 48;
  1024.     gxKazakhLanguage*            = 49;
  1025.     gxAzerbaijaniLanguage*        = 50;
  1026.     gxAzerbaijanArLanguage*        = 51;
  1027.     gxArmenianLanguage*            = 52;
  1028.     gxGeorgianLanguage*            = 53;
  1029.     gxMoldavianLanguage*            = 54;
  1030.     gxKirghizLanguage*            = 55;
  1031.     gxTajikiLanguage*            = 56;
  1032.     gxTurkmenLanguage*            = 57;
  1033.     gxMongolianLanguage*            = 58;
  1034.     gxMongolianCyrLanguage*        = 59;
  1035.     gxPashtoLanguage*            = 60;
  1036.     gxKurdishLanguage*            = 61;
  1037.     gxKashmiriLanguage*            = 62;
  1038.     gxSindhiLanguage*            = 63;
  1039.     gxTibetanLanguage*            = 64;
  1040.     gxNepaliLanguage*            = 65;
  1041.     gxSanskritLanguage*            = 66;
  1042.     gxMarathiLanguage*            = 67;
  1043.     gxBengaliLanguage*            = 68;
  1044.     gxAssameseLanguage*            = 69;
  1045.     gxGujaratiLanguage*            = 70;
  1046.     gxPunjabiLanguage*            = 71;
  1047.     gxOriyaLanguage*                = 72;
  1048.     gxMalayalamLanguage*            = 73;
  1049.     gxKannadaLanguage*            = 74;
  1050.     gxTamilLanguage*                = 75;
  1051.     gxTeluguLanguage*            = 76;
  1052.     gxSinhaleseLanguage*            = 77;
  1053.     gxBurmeseLanguage*            = 78;
  1054.     gxKhmerLanguage*                = 79;
  1055.     gxLaoLanguage*                = 80;
  1056.     gxVietnameseLanguage*        = 81;
  1057.     gxIndonesianLanguage*        = 82;
  1058.     gxTagalogLanguage*            = 83;
  1059.     gxMalayRomanLanguage*        = 84;
  1060.     gxMalayArabicLanguage*        = 85;
  1061.     gxAmharicLanguage*            = 86;
  1062.     gxTigrinyaLanguage*            = 87;
  1063.     gxGallaLanguage*                = 88;
  1064.     gxOromoLanguage*                = gxGallaLanguage;
  1065.     gxSomaliLanguage*            = 89;
  1066.     gxSwahiliLanguage*            = 90;
  1067.     gxRuandaLanguage*            = 91;
  1068.     gxRundiLanguage*                = 92;
  1069.     gxChewaLanguage*                = 93;
  1070.     gxMalagasyLanguage*            = 94;
  1071.     gxEsperantoLanguage*            = 95;
  1072.     gxWelshLanguage*                = 129;
  1073.     gxBasqueLanguage*            = 130;
  1074.     gxCatalanLanguage*            = 131;
  1075.     gxLatinLanguage*                = 132;
  1076.     gxQuechuaLanguage*            = 133;
  1077.     gxGuaraniLanguage*            = 134;
  1078.     gxAymaraLanguage*            = 135;
  1079.     gxTatarLanguage*                = 136;
  1080.     gxUighurLanguage*            = 137;
  1081.     gxDzongkhaLanguage*            = 138;
  1082.     gxJavaneseRomLanguage*        = 139;
  1083.     gxSundaneseRomLanguage*        = 140;
  1084.  
  1085.     
  1086. TYPE
  1087.     gxFontLanguage* = LONGINT;
  1088.  
  1089.  
  1090. CONST
  1091.     gxCopyrightFontName*            = 1;
  1092.     gxFamilyFontName*            = 2;
  1093.     gxStyleFontName*                = 3;
  1094.     gxUniqueFontName*            = 4;
  1095.     gxFullFontName*                = 5;
  1096.     gxVersionFontName*            = 6;
  1097.     gxPostscriptFontName*        = 7;
  1098.     gxTrademarkFontName*            = 8;
  1099.     gxManufacturerFontName*        = 9;
  1100.     gxLastReservedFontName*        = 256;
  1101.  
  1102.     
  1103. TYPE
  1104.     gxFontName* = LONGINT;
  1105.  
  1106.     gxFontTableTag* = LONGINT;
  1107.  
  1108.     gxFontVariationTag* = LONGINT;
  1109.  
  1110.     gxFontFormatTag* = LONGINT;
  1111.  
  1112.     gxFontStorageTag* = LONGINT;
  1113.  
  1114.     gxFontDescriptorTag* = gxFontVariationTag;
  1115.  
  1116.     gxFontVariation* = RECORD
  1117.         name*:                    gxFontVariationTag;
  1118.         value*:                    Types.Fixed;
  1119.     END;
  1120.  
  1121.     gxFontDescriptor* = gxFontVariation;
  1122.  
  1123.     gxFontFeatureSetting* = RECORD
  1124.         setting*:                INTEGER;
  1125.         nameID*:                    INTEGER;
  1126.     END;
  1127.  
  1128.  
  1129. CONST
  1130.     gxSystemFontAttribute*        = $0001;
  1131.     gxReadOnlyFontAttribute*        = $0002;
  1132.  
  1133.     
  1134. TYPE
  1135.     gxFontAttribute* = LONGINT;
  1136.  
  1137.  
  1138. CONST
  1139.     gxMutuallyExclusiveFeature*    = $00008000;
  1140.  
  1141.     
  1142. TYPE
  1143.     gxFontFeatureFlag* = LONGINT;
  1144.  
  1145.     gxFontFeature* = LONGINT;
  1146.  
  1147.  
  1148. CONST
  1149.     gxResourceFontStorage*        = LONG("rsrc");
  1150.     gxHandleFontStorage*            = LONG("hndl");
  1151.     gxFileFontStorage*            = LONG("bass");
  1152.     gxNfntFontStorage*            = LONG("nfnt");
  1153.  
  1154.     
  1155. TYPE
  1156.     gxFontStorageReference* = Types.Ptr;
  1157.  
  1158. (*$SET layoutTypesIncludes TRUE*)
  1159.     gxGlyphcode* = INTEGER;
  1160.  
  1161. (* single glyph in a font *)
  1162. (* byte offset within backing store *)
  1163.     gxByteOffset* = LONGINT;
  1164.  
  1165. (* The actual constants for feature types and selectors have been moved to a library. *)
  1166.     gxRunFeatureType* = INTEGER;
  1167.  
  1168.     gxRunFeatureSelector* = INTEGER;
  1169.  
  1170. (* If tracking is not desired, specify the following value in the track field in the
  1171.         gxRunControls record (note that a track of 0 does *not* mean to turn tracking off;
  1172.         rather, it means to use normal tracking). *)
  1173.  
  1174. CONST
  1175.     gxNoTracking*                = GXMath.gxNegativeInfinity;
  1176.  
  1177. (* The special "gxNoStake" value is returned by the GXGetLayoutBreakOffset call to
  1178.         indicate the absence of a character offset that is stable with respect to
  1179.         metamorphosis and contextual kerning. *)
  1180.     gxNoStake*                    = -1;
  1181.  
  1182. (* A glyph's behavior with respect to other glyphs on its line is defined in part by its
  1183.         gxBaselineType. These types allow correct alignment of the baselines of all glyphs on
  1184.         the line. *)
  1185.     gxRomanBaseline*                = 0;
  1186.     gxIdeographicCenterBaseline*    = 1;
  1187.     gxIdeographicLowBaseline*    = 2;
  1188.     gxHangingBaseline*            = 3;
  1189.     gxMathBaseline*                = 4;
  1190.     gxLastBaseline*                = 31;
  1191.     gxNumberOfBaselineTypes*        = gxLastBaseline + 1;
  1192.     gxNoOverrideBaseline*        = 255;
  1193.  
  1194.     
  1195. TYPE
  1196.     gxBaselineType* = LONGINT;
  1197.  
  1198.     gxBaselineDeltas* = ARRAY (*ΔΔ[0..*)gxNumberOfBaselineTypes(*ΔΔ -1]ΔΔ*) OF Types.Fixed;
  1199.  
  1200. (* gxJustificationPriority defines the point during the justification process at which a
  1201.     glyph will begin to receive deltas before and after itself. *)
  1202.  
  1203. CONST
  1204.     gxKashidaPriority*            = 0;
  1205.     gxWhiteSpacePriority*        = 1;
  1206.     gxInterCharPriority*            = 2;
  1207.     gxNullJustificationPriority*    = 3;
  1208.     gxNumberOfJustificationPriorities* = 4;
  1209.  
  1210.     
  1211. TYPE
  1212.     gxJustificationPriority* = CHAR;
  1213.  
  1214. (* gxJustificationFlags are used to control which fields of a gxWidthDeltaRecord are to
  1215.         be overridden and which are not if a gxPriorityJustificationOverride or
  1216.         gxGlyphJustificationOverride (qq.v.) is specified. *)
  1217.  
  1218. CONST
  1219.     gxOverridePriority*            = $8000;                        (* use priority value from override *)
  1220.     gxOverrideLimits*            = $4000;                        (* use limits values from override *)
  1221.     gxOverrideUnlimited*            = $2000;                        (* use unlimited flag from override *)
  1222.     gxUnlimitedGapAbsorption*    = $1000;                        (* glyph can take unlimited gap *)
  1223.     gxJustificationPriorityMask*    = $000F;                        (* justification priority *)
  1224.     gxAllJustificationFlags*        = gxOverridePriority + gxOverrideLimits + gxOverrideUnlimited + gxUnlimitedGapAbsorption + gxJustificationPriorityMask;
  1225.  
  1226.     
  1227. TYPE
  1228.     gxJustificationFlags* = INTEGER;
  1229.  
  1230. (* The directional behavior of a glyph can be overridden using a gxDirectionOverride. *)
  1231.  
  1232. CONST
  1233.     gxNoDirectionOverride*        = 0;
  1234.     gxImposeLeftToRight*            = 1;
  1235.     gxImposeRightToLeft*            = 2;
  1236.     gxImposeArabic*                = 3;
  1237.  
  1238.     
  1239. TYPE
  1240.     gxDirectionOverride* = INTEGER;
  1241.  
  1242. (* gxRunControlFlags describe the nonparametric layout options contained in a gxStyle. *)
  1243.  
  1244. CONST
  1245.     gxNoLigatureSplits*            = $80000000;
  1246.     gxNoCaretAngle*                = $40000000;
  1247.     gxImposeWidth*                = $20000000;
  1248.     gxNoCrossKerning*            = $10000000;
  1249.     gxNoOpticalAlignment*        = $08000000;
  1250.     gxForceHanging*                = $04000000;
  1251.     gxNoSpecialJustification*    = $02000000;
  1252.     gxDirectionOverrideMask*        = $00000003;
  1253.     gxAllRunControlFlags*        = gxNoLigatureSplits + gxNoCaretAngle + gxImposeWidth + gxNoCrossKerning + gxNoOpticalAlignment + gxForceHanging + gxNoSpecialJustification + gxDirectionOverrideMask;
  1254.  
  1255.     
  1256. TYPE
  1257.     gxRunControlFlags* = LONGINT;
  1258.  
  1259. (* gxHighlightType is used to distinguish various highlighting methods, both in terms of
  1260.         character offset based vs. visual based, and in terms of angled sides vs. non-angled
  1261.         sides. *)
  1262.  
  1263. CONST
  1264.     gxHighlightStraight*            = 0;                            (* straight-edged simple highlighting *)
  1265.     gxHighlightAverageAngle*        = 1;                            (* takes average of two edge angles *)
  1266.  
  1267.     
  1268. TYPE
  1269.     gxHighlightType* = LONGINT;
  1270.  
  1271. (* gxCaretType is used to control whether the caret that is returned from GXGetLayoutCaret
  1272.         is a split caret or a (keyboard-syncronized) single caret. *)
  1273.  
  1274. CONST
  1275.     gxSplitCaretType*            = 0;                            (* returns Mac-style split caret (default) *)
  1276.     gxLeftRightKeyboardCaret*    = 1;                            (* single caret in left-right position *)
  1277.     gxRightLeftKeyboardCaret*    = 2;                            (* single caret in right-left position *)
  1278.  
  1279.     
  1280. TYPE
  1281.     gxCaretType* = LONGINT;
  1282.  
  1283. (* gxLayoutOffsetState describes the characteristics of a given gxByteOffset in some
  1284.         layout. It is returned by the GXGetOffsetGlyphs call. Note that the
  1285.         gxOffsetInsideLigature value is returned in addition to the 8/16 (or invalid)
  1286.         indication. *)
  1287.  
  1288. CONST
  1289.     gxOffset8_8*                    = 0;
  1290.     gxOffset8_16*                = 1;
  1291.     gxOffset16_8*                = 2;
  1292.     gxOffset16_16*                = 3;
  1293.     gxOffsetInvalid*                = 4;
  1294.  
  1295.     gxOffsetInsideLigature*        = $8000;
  1296.  
  1297.     
  1298. TYPE
  1299.     gxLayoutOffsetState* = INTEGER;
  1300.  
  1301. (* gxLayoutOptionsFlags are single-bit flags contained in a gxLayoutOptions record. We
  1302.         also define here some utility constants that are useful in setting various fields in
  1303.         the gxLayoutOptions record. *)
  1304.  
  1305. CONST
  1306.     gxNoLayoutOptions*            = 0;
  1307.     gxLineIsDisplayOnly*            = $00000001;
  1308.     gxAllLayoutOptionsFlags*        = gxLineIsDisplayOnly;
  1309.     gxMaxRunLevel*                = 15;
  1310.     gxFlushLeft*                    = 0;
  1311.     gxFlushCenter*                = FixMath.fract1 DIV 2;
  1312.     gxFlushRight*                = FixMath.fract1;
  1313.     gxNoJustification*            = 0;
  1314.     gxFullJustification*            = FixMath.fract1;
  1315.  
  1316.     
  1317. TYPE
  1318.     gxLayoutOptionsFlags* = LONGINT;
  1319.  
  1320. (* A gxRunFeature describes a feature and a level for that feature. *)
  1321.     gxRunFeature* = RECORD
  1322.         featureType*:            gxRunFeatureType;
  1323.         featureSelector*:        gxRunFeatureSelector;
  1324.     END;
  1325.  
  1326. (* A gxWidthDeltaRecord contains all of the information needed to describe the behavior of one
  1327.         class of glyphs during the justification process. *)
  1328.     gxWidthDeltaRecord* = RECORD
  1329.         beforeGrowLimit*:        Types.Fixed;                                    (* ems AW can grow by at most on LT *)
  1330.         beforeShrinkLimit*:        Types.Fixed;                                    (* ems AW can shrink by at most on LT *)
  1331.         afterGrowLimit*:            Types.Fixed;                                    (* ems AW can grow by at most on RB *)
  1332.         afterShrinkLimit*:        Types.Fixed;                                    (* ems AW can shrink by at most on RB *)
  1333.         growFlags*:                gxJustificationFlags;                    (* flags controlling grow case *)
  1334.         shrinkFlags*:            gxJustificationFlags;                    (* flags controlling shrink case *)
  1335.     END;
  1336.  
  1337. (* A gxPriorityJustificationOverride contains an array of WidthDeltaRecords, one for each
  1338.         gxJustificationPriority. *)
  1339.     gxPriorityJustificationOverride* = RECORD
  1340.         deltas*:                    ARRAY (*ΔΔ[0..*)gxNumberOfJustificationPriorities(*ΔΔ -1]ΔΔ*) OF gxWidthDeltaRecord; (* overrides for each of the priorities *)
  1341.     END;
  1342.  
  1343. (* A gxGlyphJustificationOverride contains a gxWidthDeltaRecord that is to be used for a
  1344.         specific glyph in a specific run (this limitation is because glyphcodes vary by font). *)
  1345.     gxGlyphJustificationOverride* = RECORD
  1346.         glyph*:                    gxGlyphcode;
  1347.         override*:                gxWidthDeltaRecord;
  1348.     END;
  1349.  
  1350. (* gxRunControls contains flags, shifts, imposed widths and overrides for a run. *)
  1351. (* NOTE*: a value of "gxNoTracking" (see above) in track disables tracking *)
  1352.     gxRunControls* = RECORD
  1353.         flags*:                    gxRunControlFlags;
  1354.         beforeWithStreamShift*:    Types.Fixed;
  1355.         afterWithStreamShift*:    Types.Fixed;
  1356.         crossStreamShift*:        Types.Fixed;
  1357.         imposedWidth*:            Types.Fixed;
  1358.         track*:                    Types.Fixed;
  1359.         hangingInhibitFactor*:    Types.Fract;
  1360.         kerningInhibitFactor*:    Types.Fract;
  1361.         decompositionAdjustmentFactor*: Types.Fixed;
  1362.         baselineType*:            gxBaselineType;
  1363.     END;
  1364.  
  1365. (* A gxGlyphSubstitution describes one client-provided substitution that occurs after all
  1366.         other automatic glyph changes have happened. *)
  1367.     gxGlyphSubstitution* = RECORD
  1368.         originalGlyph*:            gxGlyphcode;                            (* Whenever you see this glyph... *)
  1369.         substituteGlyph*:        gxGlyphcode;                            (* ...change it to this one. *)
  1370.     END;
  1371.  
  1372. (* gxKerningAdjustmentFactors specify an adjustment to automatic kerning. The adjustment
  1373.         is ax + b where x is the automatic kerning value, a is scaleFactor, and b is
  1374.         adjustmentPointSizeFactor times the run's point size. *)
  1375.     gxKerningAdjustmentFactors* = RECORD
  1376.         scaleFactor*:            Types.Fract;
  1377.         adjustmentPointSizeFactor*: Types.Fixed;
  1378.     END;
  1379.  
  1380. (* A gxKerningAdjustment identifies with- and cross-stream kerning adjustments
  1381.         for specific glyph pairs. *)
  1382.     gxKerningAdjustment* = RECORD
  1383.         firstGlyph*:                gxGlyphcode;
  1384.         secondGlyph*:            gxGlyphcode;
  1385.         withStreamFactors*:        gxKerningAdjustmentFactors;
  1386.         crossStreamFactors*:        gxKerningAdjustmentFactors;
  1387.     END;
  1388.  
  1389. (* A value of gxResetCrossStreamFactor in crossStreamFactors.adjustmentPointSizeFactor
  1390.         will reset the cross-stream kerning to the baseline. *)
  1391.  
  1392. CONST
  1393.     gxResetCrossStreamFactor*    = GXMath.gxNegativeInfinity;
  1394.  
  1395. (* gxLayoutHitInfo contains the output from the GXHitTestLayout call. *)
  1396.  
  1397. TYPE
  1398.     gxLayoutHitInfo* = RECORD
  1399.         firstPartialDist*:        Types.Fixed;
  1400.         lastPartialDist*:        Types.Fixed;
  1401.         hitSideOffset*:            gxByteOffset;
  1402.         nonHitSideOffset*:        gxByteOffset;
  1403.         leadingEdge*:            BOOLEAN;
  1404.         inLoose*:                BOOLEAN;
  1405.     END;
  1406.  
  1407. (* A gxLineBaselineRecord contains the deltas from 0 to all the different baselines for
  1408.         the layout. It can be filled via a call to GetBaselineDeltas (q.v.). *)
  1409.     gxLineBaselineRecord* = RECORD
  1410.         deltas*:                    gxBaselineDeltas;
  1411.     END;
  1412.  
  1413. (* The gxLayoutOptions type contains information about the layout characteristics of the
  1414.         whole line. *)
  1415.     gxLayoutOptions* = RECORD
  1416.         width*:                    Types.Fixed;
  1417.         flush*:                    Types.Fract;
  1418.         just*:                    Types.Fract;
  1419.         flags*:                    gxLayoutOptionsFlags;
  1420.         baselineRec*:            POINTER TO gxLineBaselineRecord;
  1421.     END;
  1422.  
  1423. (*$SET graphicsStreamTypesIncludes TRUE*)
  1424.  
  1425. CONST
  1426.     gxNewObjectOpcode*            = $00;                            (* create new object *)
  1427.     gxSetDataOpcode*                = $40;                            (* add reference to current object *)
  1428.     gxSetDefaultOpcode*            = $80;                            (* replace current default with this object *)
  1429.     gxReservedOpcode*            = $C0;                            (* (may be used in future expansion) *)
  1430.     gxNextOpcode*                = $FF;                            (* used by currentOperand field to say opcode is coming *)
  1431.  
  1432. (* new object types (new object opcode) *)
  1433.     gxHeaderTypeOpcode*            = $00;                            (* byte following new object uses bottom 6 bits for type *)
  1434. (* gxShape types use values 1 (gxEmptyType) through 13 (gxPictureType) *)
  1435.     gxStyleTypeOpcode*            = $28;
  1436.     gxInkTypeOpcode*                = $29;
  1437.     gxTransformTypeOpcode*        = $2A;
  1438.     gxColorProfileTypeOpcode*    = $2B;
  1439.     gxColorSetTypeOpcode*        = $2C;
  1440.     gxTagTypeOpcode*                = $2D;
  1441.     gxBitImageOpcode*            = $2E;
  1442.     gxFontNameTypeOpcode*        = $2F;
  1443.     gxTrailerTypeOpcode*            = $3F;
  1444.  
  1445. (* fields of objects (set data opcodes) *)
  1446.     gxShapeAttributesOpcode*        = 0;
  1447.     gxShapeTagOpcode*            = 1;
  1448.     gxShapeFillOpcode*            = 2;
  1449.  
  1450.     gxOmitPathPositionXMask*        = $C0;
  1451.     gxOmitPathPositionYMask*        = $30;
  1452.     gxOmitPathDeltaXMask*        = $0C;
  1453.     gxOmitPathDeltaYMask*        = $03;
  1454.  
  1455.     gxOmitPathPositionXShift*    = 6;
  1456.     gxOmitPathPositionYShift*    = 4;
  1457.     gxOmitPathDeltaXShift*        = 2;
  1458.     gxOmitPathDeltaYShift*        = 0;
  1459.  
  1460.     gxOmitBitmapImageMask*        = $C0;
  1461.     gxOmitBitmapWidthMask*        = $30;
  1462.     gxOmitBitmapHeightMask*        = $0C;
  1463.     gxOmitBitmapRowBytesMask*    = $03;
  1464.  
  1465.     gxOmitBitmapImageShift*        = 6;
  1466.     gxOmitBitmapWidthShift*        = 4;
  1467.     gxOmitBitmapHeightShift*        = 2;
  1468.     gxOmitBitmapRowBytesShift*    = 0;
  1469.  
  1470.     gxOmitBitmapPixelSizeMask*    = $C0;
  1471.     gxOmitBitmapSpaceMask*        = $30;
  1472.     gxOmitBitmapSetMask*            = $0C;
  1473.     gxOmitBitmapProfileMask*        = $03;
  1474.  
  1475.     gxOmitBitmapPixelSizeShift*    = 6;
  1476.     gxOmitBitmapSpaceShift*        = 4;
  1477.     gxOmitBitmapSetShift*        = 2;
  1478.     gxOmitBitmapProfileShift*    = 0;
  1479.  
  1480.     gxOmitBitmapPositionXMask*    = $C0;
  1481.     gxOmitBitmapPositionYMask*    = $30;
  1482.  
  1483.     gxOmitBitmapPositionXShift*    = 6;
  1484.     gxOmitBitmapPositionYShift*    = 4;
  1485.  
  1486.     gxOmitBitImageRowBytesMask*    = $C0;
  1487.     gxOmitBitImageHeightMask*    = $30;
  1488.     gxOmitBitImageDataMask*        = $08;
  1489.  
  1490.     gxOmitBitImageRowBytesShift*    = 6;
  1491.     gxOmitBitImageHeightShift*    = 4;
  1492.     gxOmitBitImageDataShift*        = 3;
  1493.  
  1494.     gxCopyBitImageBytesOpcode*    = $00;
  1495.     gxRepeatBitImageBytesOpcode*    = $40;
  1496.     gxLookupBitImageBytesOpcode*    = $80;
  1497.     gxRepeatBitImageScanOpcode*    = $C0;
  1498.  
  1499.     gxOmitTextCharactersMask*    = $C0;
  1500.     gxOmitTextPositionXMask*        = $30;
  1501.     gxOmitTextPositionYMask*        = $0C;
  1502.     gxOmitTextDataMask*            = $02;
  1503.  
  1504.     gxOmitTextCharactersShift*    = 6;
  1505.     gxOmitTextPositionXShift*    = 4;
  1506.     gxOmitTextPositionYShift*    = 2;
  1507.     gxOmitTextDataShift*            = 1;
  1508.  
  1509.     gxOmitGlyphCharactersMask*    = $C0;
  1510.     gxOmitGlyphLengthMask*        = $30;
  1511.     gxOmitGlyphRunNumberMask*    = $0C;
  1512.     gxOmitGlyphOnePositionMask*    = $02;
  1513.     gxOmitGlyphDataMask*            = $01;
  1514.  
  1515.     gxOmitGlyphCharactersShift*    = 6;
  1516.     gxOmitGlyphLengthShift*        = 4;
  1517.     gxOmitGlyphRunNumberShift*    = 2;
  1518.     gxOmitGlyphOnePositionShift*    = 1;
  1519.     gxOmitGlyphDataShift*        = 0;
  1520.  
  1521.     gxOmitGlyphPositionsMask*    = $C0;
  1522.     gxOmitGlyphAdvancesMask*        = $20;
  1523.     gxOmitGlyphTangentsMask*        = $18;
  1524.     gxOmitGlyphRunsMask*            = $04;
  1525.     gxOmitGlyphStylesMask*        = $03;
  1526.  
  1527.     gxOmitGlyphPositionsShift*    = 6;
  1528.     gxOmitGlyphAdvancesShift*    = 5;
  1529.     gxOmitGlyphTangentsShift*    = 3;
  1530.     gxOmitGlyphRunsShift*        = 2;
  1531.     gxOmitGlyphStylesShift*        = 0;
  1532.  
  1533.     gxOmitLayoutLengthMask*        = $C0;
  1534.     gxOmitLayoutPositionXMask*    = $30;
  1535.     gxOmitLayoutPositionYMask*    = $0C;
  1536.     gxOmitLayoutDataMask*        = $02;
  1537.  
  1538.     gxOmitLayoutLengthShift*        = 6;
  1539.     gxOmitLayoutPositionXShift*    = 4;
  1540.     gxOmitLayoutPositionYShift*    = 2;
  1541.     gxOmitLayoutDataShift*        = 1;
  1542.  
  1543.     gxOmitLayoutWidthMask*        = $C0;
  1544.     gxOmitLayoutFlushMask*        = $30;
  1545.     gxOmitLayoutJustMask*        = $0C;
  1546.     gxOmitLayoutOptionsMask*        = $03;
  1547.  
  1548.     gxOmitLayoutWidthShift*        = 6;
  1549.     gxOmitLayoutFlushShift*        = 4;
  1550.     gxOmitLayoutJustShift*        = 2;
  1551.     gxOmitLayoutOptionsShift*    = 0;
  1552.  
  1553.     gxOmitLayoutStyleRunNumberMask* = $C0;
  1554.     gxOmitLayoutLevelRunNumberMask* = $30;
  1555.     gxOmitLayoutHasBaselineMask*    = $08;
  1556.     gxOmitLayoutStyleRunsMask*    = $04;
  1557.     gxOmitLayoutStylesMask*        = $03;
  1558.  
  1559.     gxOmitLayoutStyleRunNumberShift* = 6;
  1560.     gxOmitLayoutLevelRunNumberShift* = 4;
  1561.     gxOmitLayoutHasBaselineShift* = 3;
  1562.     gxOmitLayoutStyleRunsShift*    = 2;
  1563.     gxOmitLayoutStylesShift*        = 0;
  1564.  
  1565.     gxOmitLayoutLevelRunsMask*    = $80;
  1566.     gxOmitLayoutLevelsMask*        = $40;
  1567.  
  1568.     gxOmitLayoutLevelRunsShift*    = 7;
  1569.     gxOmitLayoutLevelsShift*        = 6;
  1570.  
  1571.     gxInkAttributesOpcode*        = 0;
  1572.     gxInkTagOpcode*                = 1;
  1573.     gxInkColorOpcode*            = 2;
  1574.     gxInkTransferModeOpcode*        = 3;
  1575.  
  1576.     gxOmitColorsSpaceMask*        = $C0;
  1577.     gxOmitColorsProfileMask*        = $30;
  1578.     gxOmitColorsComponentsMask*    = $0F;
  1579.     gxOmitColorsIndexMask*        = $0C;
  1580.     gxOmitColorsIndexSetMask*    = $03;
  1581.  
  1582.     gxOmitColorsSpaceShift*        = 6;
  1583.     gxOmitColorsProfileShift*    = 4;
  1584.     gxOmitColorsComponentsShift*    = 0;
  1585.     gxOmitColorsIndexShift*        = 2;
  1586.     gxOmitColorsIndexSetShift*    = 0;
  1587.  
  1588.     gxOmitTransferSpaceMask*        = $C0;
  1589.     gxOmitTransferSetMask*        = $30;
  1590.     gxOmitTransferProfileMask*    = $0C;
  1591.  
  1592.     gxOmitTransferSpaceShift*    = 6;
  1593.     gxOmitTransferSetShift*        = 4;
  1594.     gxOmitTransferProfileShift*    = 2;
  1595.  
  1596.     gxOmitTransferSourceMatrixMask* = $C0;
  1597.     gxOmitTransferDeviceMatrixMask* = $30;
  1598.     gxOmitTransferResultMatrixMask* = $0C;
  1599.     gxOmitTransferFlagsMask*        = $03;
  1600.  
  1601.     gxOmitTransferSourceMatrixShift* = 6;
  1602.     gxOmitTransferDeviceMatrixShift* = 4;
  1603.     gxOmitTransferResultMatrixShift* = 2;
  1604.     gxOmitTransferFlagsShift*    = 0;
  1605.  
  1606.     gxOmitTransferComponentModeMask* = $80;
  1607.     gxOmitTransferComponentFlagsMask* = $40;
  1608.     gxOmitTransferComponentSourceMinimumMask* = $30;
  1609.     gxOmitTransferComponentSourceMaximumMask* = $0C;
  1610.     gxOmitTransferComponentDeviceMinimumMask* = $03;
  1611.  
  1612.     gxOmitTransferComponentModeShift* = 7;
  1613.     gxOmitTransferComponentFlagsShift* = 6;
  1614.     gxOmitTransferComponentSourceMinimumShift* = 4;
  1615.     gxOmitTransferComponentSourceMaximumShift* = 2;
  1616.     gxOmitTransferComponentDeviceMinimumShift* = 0;
  1617.  
  1618.     gxOmitTransferComponentDeviceMaximumMask* = $C0;
  1619.     gxOmitTransferComponentClampMinimumMask* = $30;
  1620.     gxOmitTransferComponentClampMaximumMask* = $0C;
  1621.     gxOmitTransferComponentOperandMask* = $03;
  1622.  
  1623.     gxOmitTransferComponentDeviceMaximumShift* = 6;
  1624.     gxOmitTransferComponentClampMinimumShift* = 4;
  1625.     gxOmitTransferComponentClampMaximumShift* = 2;
  1626.     gxOmitTransferComponentOperandShift* = 0;
  1627.  
  1628.     gxStyleAttributesOpcode*        = 0;
  1629.     gxStyleTagOpcode*            = 1;
  1630.     gxStyleCurveErrorOpcode*        = 2;
  1631.     gxStylePenOpcode*            = 3;
  1632.     gxStyleJoinOpcode*            = 4;
  1633.     gxStyleDashOpcode*            = 5;
  1634.     gxStyleCapsOpcode*            = 6;
  1635.     gxStylePatternOpcode*        = 7;
  1636.     gxStyleTextAttributesOpcode*    = 8;
  1637.     gxStyleTextSizeOpcode*        = 9;
  1638.     gxStyleFontOpcode*            = 10;
  1639.     gxStyleTextFaceOpcode*        = 11;
  1640.     gxStylePlatformOpcode*        = 12;
  1641.     gxStyleFontVariationsOpcode*    = 13;
  1642.     gxStyleRunControlsOpcode*    = 14;
  1643.     gxStyleRunPriorityJustOverrideOpcode* = 15;
  1644.     gxStyleRunGlyphJustOverridesOpcode* = 16;
  1645.     gxStyleRunGlyphSubstitutionsOpcode* = 17;
  1646.     gxStyleRunFeaturesOpcode*    = 18;
  1647.     gxStyleRunKerningAdjustmentsOpcode* = 19;
  1648.     gxStyleJustificationOpcode*    = 20;
  1649.  
  1650.     gxOmitDashAttributesMask*    = $C0;
  1651.     gxOmitDashShapeMask*            = $30;
  1652.     gxOmitDashAdvanceMask*        = $0C;
  1653.     gxOmitDashPhaseMask*            = $03;
  1654.  
  1655.     gxOmitDashAttributesShift*    = 6;
  1656.     gxOmitDashShapeShift*        = 4;
  1657.     gxOmitDashAdvanceShift*        = 2;
  1658.     gxOmitDashPhaseShift*        = 0;
  1659.  
  1660.     gxOmitDashScaleMask*            = $C0;
  1661.  
  1662.     gxOmitDashScaleShift*        = 6;
  1663.  
  1664.     gxOmitPatternAttributesMask*    = $C0;
  1665.     gxOmitPatternShapeMask*        = $30;
  1666.     gxOmitPatternUXMask*            = $0C;
  1667.     gxOmitPatternUYMask*            = $03;
  1668.  
  1669.     gxOmitPatternAttributesShift* = 6;
  1670.     gxOmitPatternShapeShift*        = 4;
  1671.     gxOmitPatternUXShift*        = 2;
  1672.     gxOmitPatternUYShift*        = 0;
  1673.  
  1674.     gxOmitPatternVXMask*            = $C0;
  1675.     gxOmitPatternVYMask*            = $30;
  1676.  
  1677.     gxOmitPatternVXShift*        = 6;
  1678.     gxOmitPatternVYShift*        = 4;
  1679.  
  1680.     gxOmitJoinAttributesMask*    = $C0;
  1681.     gxOmitJoinShapeMask*            = $30;
  1682.     gxOmitJoinMiterMask*            = $0C;
  1683.  
  1684.     gxOmitJoinAttributesShift*    = 6;
  1685.     gxOmitJoinShapeShift*        = 4;
  1686.     gxOmitJoinMiterShift*        = 2;
  1687.  
  1688.     gxOmitCapAttributesMask*        = $C0;
  1689.     gxOmitCapStartShapeMask*        = $30;
  1690.     gxOmitCapEndShapeMask*        = $0C;
  1691.  
  1692.     gxOmitCapAttributesShift*    = 6;
  1693.     gxOmitCapStartShapeShift*    = 4;
  1694.     gxOmitCapEndShapeShift*        = 2;
  1695.  
  1696.     gxOmitFaceLayersMask*        = $C0;
  1697.     gxOmitFaceMappingMask*        = $30;
  1698.  
  1699.     gxOmitFaceLayersShift*        = 6;
  1700.     gxOmitFaceMappingShift*        = 4;
  1701.  
  1702.     gxOmitFaceLayerFillMask*        = $C0;
  1703.     gxOmitFaceLayerFlagsMask*    = $30;
  1704.     gxOmitFaceLayerStyleMask*    = $0C;
  1705.     gxOmitFaceLayerTransformMask* = $03;
  1706.  
  1707.     gxOmitFaceLayerFillShift*    = 6;
  1708.     gxOmitFaceLayerFlagsShift*    = 4;
  1709.     gxOmitFaceLayerStyleShift*    = 2;
  1710.     gxOmitFaceLayerTransformShift* = 0;
  1711.  
  1712.     gxOmitFaceLayerBoldXMask*    = $C0;
  1713.     gxOmitFaceLayerBoldYMask*    = $30;
  1714.  
  1715.     gxOmitFaceLayerBoldXShift*    = 6;
  1716.     gxOmitFaceLayerBoldYShift*    = 4;
  1717.  
  1718.     gxColorSetReservedOpcode*    = 0;
  1719.     gxColorSetTagOpcode*            = 1;
  1720.  
  1721.     gxColorProfileReservedOpcode* = 0;
  1722.     gxColorProfileTagOpcode*        = 1;
  1723.  
  1724.     gxTransformReservedOpcode*    = 0;
  1725.     gxTransformTagOpcode*        = 1;
  1726.     gxTransformClipOpcode*        = 2;
  1727.     gxTransformMappingOpcode*    = 3;
  1728.     gxTransformPartMaskOpcode*    = 4;
  1729.     gxTransformToleranceOpcode*    = 5;
  1730.  
  1731.     gxTypeOpcode*                = 0;
  1732.     gxSizeOpcode*                = 1;
  1733.  
  1734. (* used by currentOperand when currentOperation is gxNextOpcode *)
  1735. (*    format of top byte*:
  1736. xx yyyyyy    xx == 0x00, 0x40, 0x80, 0xC0: defines graphics operation (see gxGraphicsOperationOpcode)
  1737.             yyyyyy == size of operation in bytes
  1738.             if (yyyyyy == 0), byte size follows. If byte following == 0, word size follows; if == 0, long follows
  1739.             word and long, if present, are specified in high-endian order (first byte is largest magnitude)
  1740.             
  1741. format of byte following size specifiers, if any*:
  1742. xx yyyyyy    xx == 0x00, 0x40, 0x80, 0xC0: defines compression level (0 == none, 0xC0 == most)
  1743.             exact method of compression is defined by type of data
  1744.             yyyyyy == data type selector (0 to 63): see gxGraphicsNewOpcode, __DataOpcode
  1745. *)
  1746.     gxOpcodeShift*                = 6;
  1747.     gxObjectSizeMask*            = $3F;
  1748.     gxCompressionShift*            = 6;
  1749.     gxObjectTypeMask*            = $3F;
  1750.     gxBitImageOpcodeMask*        = $C0;
  1751.     gxBitImageCountMask*            = $3f;
  1752.     gxBitImageOpcodeShift*        = 6;
  1753.  
  1754.     gxNoCompression*                = 0;
  1755.     gxWordCompression*            = 1;
  1756.     gxByteCompression*            = 2;
  1757.     gxOmitCompression*            = 3;
  1758.     gxCompressionMask*            = $03;
  1759.  
  1760. (*    the following structures define how primitives without a public geometry
  1761.     are stored (their format mirrors that of the New call to create them)    *)
  1762.  
  1763. TYPE
  1764.     gxFlatFontName* = RECORD
  1765.         name*:                    Types.SInt8; (* unsigned char *)                (* gxFontName *)
  1766.         platform*:                Types.SInt8; (* unsigned char *)                (* gxFontPlatform *)
  1767.         script*:                    Types.SInt8; (* unsigned char *)                (* gxFontScript *)
  1768.         language*:                Types.SInt8; (* unsigned char *)                (* gxFontLanguage *)
  1769.         length*:                    INTEGER;                                (* byte length *)
  1770.     END;
  1771.  
  1772.  
  1773. CONST
  1774.     gxFlatFontListItemTag*        = LONG("flst");
  1775.  
  1776.  
  1777. TYPE
  1778.     gxFlatFontListItem* = RECORD
  1779.         fontID*:                    gxFont;                                    (*** if we get rid of this, remove #include "font types.h", above *)
  1780.         name*:                    Types.SInt8; (* unsigned char *)                (* gxFontName *)
  1781.         platform*:                Types.SInt8; (* unsigned char *)                (* gxFontPlatform *)
  1782.         script*:                    Types.SInt8; (* unsigned char *)                (* gxFontScript *)
  1783.         language*:                Types.SInt8; (* unsigned char *)                (* gxFontLanguage *)
  1784.         length*:                    INTEGER;                                (* byte length of the name that follows *)
  1785.         glyphCount*:                INTEGER;                                (* CountFontGlyphs or 0 if gxFontGlyphsFlatten is false *)
  1786.         axisCount*:                INTEGER;                                (* CountFontVariations or 0 if gxFontVariationsFlatten is false *)
  1787.         variationCount*:            INTEGER;                                (* number of bitsVariationPairs that follow the (optional) glyphBits *)
  1788.     END;
  1789.  
  1790.     gxFlatFontList* = RECORD
  1791.         count*:                    LONGINT;
  1792.         items*:                    ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF gxFlatFontListItem;
  1793.     END;
  1794.  
  1795.     gxFlattenHeader* = RECORD
  1796.         version*:                Types.Fixed;
  1797.         flatFlags*:                Types.SInt8; (* unsigned char *)
  1798.         padding*:                Types.SInt8;
  1799.     END;
  1800.  
  1801.  
  1802. CONST
  1803.     gxOmitPictureShapeMask*        = $C0;
  1804.     gxOmitOverrideStyleMask*        = $30;
  1805.     gxOmitOverrideInkMask*        = $0C;
  1806.     gxOmitOverrideTransformMask*    = $03;
  1807.  
  1808.     gxOmitPictureShapeShift*        = $6;
  1809.     gxOmitOverrideStyleShift*    = $4;
  1810.     gxOmitOverrideInkShift*        = $2;
  1811.     gxOmitOverrideTransformShift* = $0;
  1812.  
  1813. (*$SET gxSynonymTags TRUE*)
  1814.     gxPostScriptTag*                = LONG("post");
  1815.     gxPostControlTag*            = LONG("psct");
  1816.  
  1817.     gxNoSave*                    = 1;                            (* don't do save-restore around PS data *)
  1818.  
  1819.  
  1820. TYPE
  1821.     gxPostControl* = RECORD
  1822.         flags*:                    LONGINT;                                (* PostScript state flags *)
  1823.     END;
  1824.  
  1825.  
  1826. CONST
  1827.     gxDashSynonymTag*            = LONG("sdsh");
  1828.  
  1829.  
  1830. TYPE
  1831.     gxDashSynonym* = RECORD
  1832.         size*:                    LONGINT;                                (* number of elements in array *)
  1833.         dashLength*:                ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF Types.Fixed;                    (* Array of dash lengths *)
  1834.     END;
  1835.  
  1836.  
  1837. CONST
  1838.     gxLineCapSynonymTag*            = LONG("lcap");
  1839.  
  1840.     gxButtCap*                    = 0;
  1841.     gxRoundCap*                    = 1;
  1842.     gxSquareCap*                    = 2;
  1843.     gxTriangleCap*                = 3;
  1844.  
  1845. (* gxLine cap type *)
  1846.     
  1847. TYPE
  1848.     gxLineCapSynonym* = LONGINT;
  1849.  
  1850.  
  1851. CONST
  1852.     gxCubicSynonymTag*            = LONG("cubx");
  1853.  
  1854.     gxIgnoreFlag*                = $0000;                        (* Ignore this word, get next one *)
  1855.     gxLineToFlag*                = $0001;                        (* Draw a gxLine to GXMath.gxPoint following this flag *)
  1856.     gxCurveToFlag*                = $0002;                        (* Draw a gxCurve through the 3 points following this flag *)
  1857.     gxMoveToFlag*                = $0003;                        (* Start a new contour at the GXMath.gxPoint following this flag *)
  1858.     gxClosePathFlag*                = $0004;                        (* Close the contour *)
  1859.  
  1860.     gxCubicInstructionMask*        = $000F;                        (* low four bits are GXMath.gxPoint instructions *)
  1861.  
  1862. (* Low four bits are instruction (moveto, lineto, curveto, closepath) *)
  1863.     
  1864. TYPE
  1865.     gxCubicSynonymFlags* = INTEGER;
  1866.  
  1867.  
  1868. CONST
  1869.     gxPatternSynonymTag*            = LONG("ptrn");
  1870.  
  1871.     gxHatch*                        = 0;
  1872.     gxCrossHatch*                = 1;
  1873.  
  1874.  
  1875. TYPE
  1876.     gxPatternSynonym* = RECORD
  1877.         patternType*:            LONGINT;                                (* one of the gxPatterns*: gxHatch or gxCrossHatch *)
  1878.         angle*:                    Types.Fixed;                                    (* angle at which pattern is drawn *)
  1879.         spacing*:                Types.Fixed;                                    (* distance between two parallel pattern lines *)
  1880.         thickness*:                Types.Fixed;                                    (* thickness of the pattern *)
  1881.         anchorPoint*:            GXMath.gxPoint;                                (* GXMath.gxPoint with with respect to which pattern position is calculated *)
  1882.     END;
  1883.  
  1884.  
  1885. (* $ALIGN RESET*)
  1886. (* $POP*)
  1887.  
  1888.  END GXTypes.
  1889.